]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extension-tool/create: Update for new versioning scheme
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 25 Feb 2021 23:54:50 +0000 (00:54 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 26 Feb 2021 22:06:43 +0000 (23:06 +0100)
The "shell-version" field generated by the create command still
uses the old even/odd schema instead of the new "alpha", "beta"
etc. one.

Do that now, and also drop the different behavior for stable/unstable
releases (that is, always use only the major number, i.e. "40").

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3787

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1719>

subprojects/extensions-tool/src/command-create.c

index b328b6003bef92103c6183ea2302cb441caa2525..64b38824aa0c5be925fcc027ab6c8cbb1f84d7a9 100644 (file)
@@ -49,11 +49,8 @@ get_shell_version (GError **error)
   if (variant == NULL)
     return NULL;
 
-  split_version = g_strsplit (g_variant_get_string (variant, NULL), ".", 3);
-  if (g_ascii_strtoll (split_version[1], NULL, 10) % 2 == 0)
-    g_clear_pointer (&split_version[2], g_free);
-
-  return g_strjoinv (".", split_version);
+  split_version = g_strsplit (g_variant_get_string (variant, NULL), ".", 2);
+  return g_steal_pointer(&split_version[0]);
 }
 
 static GDesktopAppInfo *